Computers use a variety of technologies for storing data. Some consume more system resources than others. “Non-volatile storage” refers to storage that survives events such as the loss of power or reboot of a computer. All long-lived data must reside in non-volatile storage for persistence. Hard-disk drives (HDDs, also known as magnetic disk drives) are the most common example of non-volatile mass storage. Data that are stored on an HDD can also be temporarily stored in other media with faster read or write time to improve access performance. These media could be alternate non-volatile memory such as Flash memory, magnetic RAM (MRAM) or volatile memory such as dynamic random access memory (DRAM) or Static RAM (SRAM). A number of other technologies exist which offer additional trade-offs in the decision of where to store data. In addition to technologies within the system, data may be stored and/or cached over a network on a remote storage system.
Portable computers with HDDs, such as notebooks and some personal digital assistants (PDAs), suffer from reduced battery life due to HDD accesses when reading or updating files. Using a DRAM as a read cache, while done initially solely for performance considerations, is known to have additional benefits in reducing energy consumption by eliminating the need for accesses to the HDD. Some in the industry have proposed using large non-volatile caches to temporarily hold all write content for the HDD. Buffering writes in a cache can improve performance by permitting an application to proceed without waiting for an HDD operation to complete, and it can further benefit a portable computer by permitting the HDD to spin down while inactive, saving energy. When the cache is full, or the HDD is accessed to read a file, the cached content is written out to the HDD. Three HDD-related power components are saved in this fashion: 1) the idle spin power; 2) the access power; and 3) the power related to managing the multiple performance modes after each access.
There are several tradeoffs among different memory types. The disadvantages of using system memory (SRAM or DRAM) only to cache data are high cost, limited capacity, and non-volatility. MRAM is not a commercially available technology yet and is likely to be expensive at first. Flash suffers from two issues, namely limited erase-write cycles and slow erase times. Networked storage may be slow, unreliable and unavailable in remote areas.
Efficiently managing the available capacity of a cache is important with respect to several metrics: performance; power consumption; and device lifetime (when accesses are limited). A typical methodology for controlling a cache in a memory or storage hierarchy is to treat all cache entries as equivalent, then replace each entry using a heuristic that attempts to cache the data that are most likely to be accessed again in the near future. Heuristics are algorithms/functions proved to work in ‘most’ cases, i.e., algorithms that return one of the best solutions, not necessarily the best one. Heuristics are used when there is no known algorithm for computing the best solution or when the ‘best-solution’ algorithm exists but it is too expensive in terms of system resources to run it. The most common heuristic is to expel the “least recently used” data when there is no room in the cache to hold new data. Optimizations of this heuristic account for such things as large, sequential read accesses that are known a priori to be unlikely to be repeated during the interval the data would be cached; such data can be omitted from the cache to avoid flushing more useful data.
Therefore, there is a need for a system and method for preserving information based on energy-conserving criteria important to users of portable information processing systems.